<?php $this->headLink()->appendStylesheet($this->resource('css/chat.css', 'chat')); ?>

<?php $convo = $this->messages; ?>

<?php if (empty($convo)) : ?>

    <p>There's nothing here.</p>

<?php else : ?>

<?php     foreach ($convo as $msg) : ?>
    <p title="<?php echo date('Y-M-d H:i:s', $msg['date']); ?>">
<?php         if (!empty($msg['url'])) : ?>
        <strong><a href="<?php echo $this->escape($msg['url']); ?>"><?php echo $this->escape($msg['name']); ?></a></strong>:
<?php         else : ?>
        <strong><?php echo $this->escape($msg['name']); ?></strong>:
<?php         endif; ?>
        <?php echo $this->escape($msg['message']); ?>

    </p>
<?php     endforeach; ?>

<?php endif; ?>

<?php echo $this->form->renderForm(false); ?>
<fieldset>
    <legend>say something</legend>
    <dl>
        <dt><?php echo $this->form->name->renderLabel(); ?></dt>
        <dd><?php echo $this->form->name->renderViewHelper(); ?></dd>
        <dd><?php echo $this->form->name->renderErrors(); ?></dd>
    </dl>
    <dl>
        <dt><?php echo $this->form->url->renderLabel(); ?></dt>
        <dd><?php echo $this->form->url->renderViewHelper(); ?></dd>
        <dd><?php echo $this->form->url->renderErrors(); ?></dd>
    </dl>
    <dl>
        <dt><?php echo $this->form->message->renderLabel(); ?></dt>
        <dd><?php echo $this->form->message->renderViewHelper(); ?></dd>
        <dd><?php echo $this->form->message->renderErrors(); ?></dd>
    </dl>
    <dl>
        <dd><?php echo $this->form->submit->renderViewHelper(); ?></dd>
    </dl>
    <input type="hidden" name="_redirect" value="<?php echo $this->url(); ?>" />
</fieldset>
</form>

<!-- chat/index/index: $Id: index.phtml 12 2009-02-28 13:39:31Z monzee $ -->
